from typing import *


class Solution:

    def miceAndCheese(self, reward1: List[int], reward2: List[int],
                      k: int) -> int:
        array = sorted([a - b for a, b in zip(reward1, reward2)], reverse=True)
        ans = sum(reward2)
        for i in range(k):
            ans += array[i]
        return ans
